// JavaScript Document.Add by xjk at 2013-08-13

function Ajax(url,method,data){
	this.url=url;
	this.method=method;
	this.data=data

	 
			
}

Ajax.prototype.createAjax=function(){
	if(window.XMLHttpRequest){
		oAjax=new XMLHttpRequest();	
	}else{
		oAjax=new ActiveXObject("Microsoft XMLHTTP");	
	}
	return oAjax;
}

Ajax.prototype.sendParam=function(oAjax){
		if(this.method=='POST'){
 				oAjax.setRequestHeder("Content-Type","application/x-www-form-urlencoded;charset=UTF-8");
     			oAjax.send("user="+username+"&pwd="+password);
		}else if(this.method=='GET'){
			
			this.url=this.url+'?'+this.data;
			oAjax.open(this.method,this.url,true);
			oAjax.send(null);
		}	
}

Ajax.prototype.referdata=function(oAjax){
		oAjax.onreadystatechange=function(){
			if(oAjax.readyState==4){
					if(oAjax.status==200){
							return oAjax.responseText;
						}
				}
			
		}
}


